package com.woniuxy.micromedicalserver.hospitalmanage.mapper;

import com.woniuxy.micromedicalserver.bean.HospitalBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HospitalMapper {

    //向数据库中插入数据，返回插入的ID
    @Options(
            useGeneratedKeys = true,
            keyProperty = "id"
    )
    Integer insertHospital(@Param("hospitalBean") HospitalBean hospitalBean);


    //根据id，查询
    HospitalBean selectByID(Integer ID);
    //查询所有, 传递一个接收筛选条件的HospitalBean
    List<HospitalBean> selectAllHospital(@Param("hospitalBean") HospitalBean hospitalBean);


    //修改和逻辑删除(即修改）
    void updateHospital(@Param("hospitalBean") HospitalBean hospitalBean);



}
